AC_INIT([ctoolbox], [1.0-1], [bob.hepple@gmail.com])
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-extra-portability foreign])
#AM_INIT_AUTOMAKE([-Wall -Werror foreign])
# AM_PROG_AR
DATE=`date`
AC_LANG_C

# Check-g -O0 -DDEBUG -fno-inline whether to include debugging code
DEBUG=""
AC_MSG_CHECKING([whether to include verbose debugging code])
AC_ARG_ENABLE(debug,
  [  --enable-debug          include verbose debugging code [default=yes]],
  if test x$enableval = "xyes"; then
    AC_MSG_RESULT([yes])
    DEBUG="-g -O0 -DDEBUG -fno-inline"
  else
    AC_MSG_RESULT([yes])
    DEBUG="-g -O0 -DDEBUG -fno-inline"
  fi,
  AC_MSG_RESULT([yes])
)
AC_SUBST(DEBUG)
CFLAGS="$DEBUG"

AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_CC
AM_PROG_CC_C_O
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile src/Makefile src/tests/Makefile doc/Makefile m4/Makefile])
AC_SUBST(DEBUG)
CFLAGS="$DEBUG"

AC_CHECK_PROGS([DOXYGEN], [doxygen])

AC_CONFIG_MACRO_DIR([m4])

DX_DOXYGEN_FEATURE(ON)
DX_HTML_FEATURE(ON)
DX_INIT_DOXYGEN([ctoolbox],[doxygen.cfg])

AC_OUTPUT
